#pragma once

extern HANDLE hExitNewLevelSecurityManagerEvent;
class Cx_BaseStockPolicy;
class Cx_NewLevelSecurityManager
{
public:
	Cx_NewLevelSecurityManager(void);
	~Cx_NewLevelSecurityManager(void);

	static DWORD WINAPI AfxNewLevelOrderStockThread(LPVOID lParam);
	static DWORD WINAPI AfxNewLevelFutureThread(LPVOID lParam);
public:
	BOOL Run();

	void ExitAllNewLevelStockThread();

	void StartPolicyThread(const mapStockPolicy &mapInPut);
	void StartFutureThread(const map<string, future_param_item> &mapInPut);

	void GetNewLevelStockParam(mapStockPolicy &mapOutPut);
	void GetNewLevelFutureParam(map<string, future_param_item> &mapOutPut);

	BOOL ResetNewLevelVaribale();
	bool TimeToInit();
	bool InTradingTime();
	bool NeedReloadDpConfig(long startdate);
};
